<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="zh-cn">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta name="renderer" content="webkit">
    <title><?php echo ($title); ?></title>
    <link rel="stylesheet" href="/Public/web/css/pintuer.css">
    <link rel="stylesheet" href="/Public/web/css/admin.css">
    <script src="/Public/web/js/jquery.js"></script>
    <script src="/Public/web/js/pintuer.js"></script>
</head>

<script language="javascript" type="text/javascript" src="/Public/My97DatePicker/WdatePicker.js"></script>

<body>
  <form action="" id="listform">
    <div class="panel admin-panel">
      <div class="panel-head"><strong class="icon-reorder"> <?php echo L("huiyuanliebiao");?></strong></div>
      <div class="padding border-bottom">
        <ul class="search" style="padding-left:10px;">
          <li><?php echo L("sousuo");?>：</li>
          <li><input class="input" type="text" name="nickname" value="<?php echo ($nickname); ?>" placeholder="<?php echo L('qingshuru'); echo L('yonghuming');?>"></li>
          <li><input class="input" type="text" name="tel" value="<?php echo ($tel); ?>" placeholder="<?php echo L('qingshuru'); echo L('lianxishouji');?>"></li>
          <li><?php echo L("shijianfanwei");?>：</li><li><input class="Wdate input" type="text" name="start_time" value="<?php echo ($start_time); ?>" onClick="WdatePicker()" /></li>
          <li>~</li>
          <li><input class="Wdate input" type="text" name="end_time" value="<?php echo ($end_time); ?>" onClick="WdatePicker()" /></li>
          <li><input type="submit" value="<?php echo L('sousuo');?>" class="button border-main icon-search"/></li>
        </ul>
      </div>
      <table class="table table-hover text-center">
        <tr>
          <th width="100">ID</th>
          <th width="10%"><?php echo L("yonghutouxiang");?></th>
          <th><?php echo L("yonghuming");?>（<?php echo L("xingming");?>）</th>
          <th><?php echo L("lianxishouji");?></th>
          <!--<th><?php echo L("huiyuanjibie");?> / <?php echo L("tuijianren");?></th>-->
          <th><?php echo L("zhuceshijian");?></th>
          <th width="310"><?php echo L("caozuo");?></th>
        </tr>
        <?php if(is_array($list)): foreach($list as $key=>$v): ?><tr class="tr<?php echo ($v['user_id']); ?>">
            <td><?php echo ($v['user_id']); ?></td>
            <td><img src="/<?php echo ($v['headimgurl']); ?>" width="50px"></td>
            <td><?php echo ((isset($v['nickname']) && ($v['nickname'] !== ""))?($v['nickname']):"--"); ?>（<?php echo ((isset($v['full_name']) && ($v['full_name'] !== ""))?($v['full_name']):"--"); ?>）</td>
            <td><?php echo ((isset($v['tel']) && ($v['tel'] !== ""))?($v['tel']):"--"); ?></td>
            <!--<td><?php if($v['power'] == 0): echo L("putonghuiyuan"); elseif($v['power'] == 1): ?><font color="#f00"><?php echo L("gaojihuiyuan");?></font><?php endif; ?> / <?php echo ((isset($v['tuijian']) && ($v['tuijian'] !== ""))?($v['tuijian']):"&#45;&#45;"); ?></td>-->
            <td><?php echo (date("Y-m-d H:i:d",$v['register_time'])); ?></td>
            <td>
              <div class="button-group">
                <a class="button border-main" href="<?php echo U('Member/edit',array('id'=>$v['user_id']));?>"><span class="icon-edit"></span> <?php echo L("bianji");?></a>
                <a class="button border-red" href="javascript:void(0)" onclick="return del(<?php echo ($v['user_id']); ?>)"><span class="icon-trash-o"></span> <?php echo L("shanchu");?></a>
              </div>
            </td>
          </tr><?php endforeach; endif; ?>
        <tr>
          <td colspan="10"><div class="pagelist"><?php echo ($page); ?></div></td>
        </tr>
      </table>
    </div>
  </form>
  <script type="text/javascript">
    function del(id){
      if(confirm("<?php echo L('shanchuxiaoxi');?>")){
        var url = "<?php echo U('Member/delete');?>";
        $.getJSON(url,{id:id},function (data){
          if(data.result == 'yes'){$(".tr"+id).remove();}
          else if(data.result == 'no'){alert('ERROR.');}
        })
      }
    }
  </script>
</body>

</html>